package com.cl.short_video_java.web;


import com.cl.short_video_java.common.Result;
import com.cl.short_video_java.dto.MailDto;
import com.cl.short_video_java.service.impl.MailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author 付
 * @Date 2024-03-28 17:21
 * @Version 1.0
 * @description
 * @since 1.0
 */

@RestController
@RequestMapping("/mail")
public class EmailController {
	@Autowired
	MailService mailService;

	/**
	 * 验证码发送
	 *
	 * @param mail
	 * @return
	 * @throws Exception
	 */
	@GetMapping("/captcha")
	public Result emailSender(String mail) throws Exception {
		mailService.ostSeander(mail);
		return Result.success();
	}

}
